//
// Sequential Queue
// Created by Win10 on 2022/10/30.
//

#ifndef C_DATA_STRUCTURE_SQ_QUEUE_H
#define C_DATA_STRUCTURE_SQ_QUEUE_H

#define MaxSize 5

typedef int ElemType;

typedef struct {
    int front, rear;
    ElemType data[MaxSize];
} SqQueue;

void InitQueue(SqQueue &Q);

bool QueueEmpty(SqQueue Q);

bool QueueFull(SqQueue Q);

bool EnQueue(SqQueue &Q, ElemType x);

bool DeQueue(SqQueue &Q, ElemType &x);

bool GetHead(SqQueue Q, ElemType &x);

#endif //C_DATA_STRUCTURE_SQ_QUEUE_H
